package com.exam.service.impl;

import com.exam.common.ServResult;
import com.exam.dao.TLogDao;
import com.exam.service.TLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 日志接口
 */
@Service("tLogService")
public class TLogServiceImpl implements TLogService {
    @Autowired
    private TLogDao tLogDao;
    @Override
    public void save(Map<String, Object> param) {
        tLogDao.save(param);
    }

    @Override
    public ServResult tjVisitCountOfExamDetail(String examId) {
        ServResult result = null;
        try {
            int count = tLogDao.tjVisitCountOfExamDetail(examId);
            result = ServResult.success(count);
        } catch (Exception e) {
            result = ServResult.fail();
        }
        return result;
    }
}
